package com.example.demo.service;

import org.springframework.stereotype.Service;

@Service
public class GreetingService {

    public String getGreeting(String name) {
        if (name == null || name.trim().isEmpty()) {
            name = "World";
        }
        return String.format("Hello %s from Service Layer!", name);
    }

    public String getInfo() {
        return "这是一个基于 Gradle 构建的多模块 Spring Boot 项目 - Service 层";
    }

    public String getWelcomeMessage() {
        return "欢迎使用多模块 Spring Boot Demo!";
    }
}